/*
 * @Date: 2022-09-16 09:20:00
 * @LastEditTime: 2022-09-16 09:23:02
 */
import Layout from "@/layout";
export const staticRoutes = [
  //静态路由谁都能进
  {
    path: "/login",
    component: () => import("@/views/login/index"),
    hidden: true,
  },

  {
    path: "/404",
    component: () => import("@/views/404"),
    hidden: true,
  },
  {
    path: "/",
    component: Layout,
    redirect: "/dashboard",
    children: [
      {
        path: "dashboard",
        name: "首页",
        component: () => import("@/views/dashboard/index"),
        meta: { title: "首页", icon: "dashboard" },
      },
    ],
  },
];

export const runRouter = [
  //动态路由
  {
    path: "/acl",
    component: Layout,
    name: "Acl",
    meta: { title: "权限管理", icon: "el-icon-picture-outline-round" },
    children: [
      {
        path: "user/list",
        name: "User",
        component: () => import("@/views/acl/user/user.vue"),
        meta: { title: "用户管理" },
      },
      {
        path: "role/list",
        name: "Role",
        component: () => import("@/views/acl/role/role.vue"),
        meta: { title: "角色管理" },
      },
      {
        path: "test/list",
        name: "Test",
        component: () => import("@/views/acl/btnTest/btnTest.vue"),
        meta: { title: "按钮测试" },
      },
    ],
  },
];

//任意路由
export const anyRouter = { path: "*", redirect: "/404", hidden: true };
